home *** CD-ROM | disk | FTP | other *** search
- /* (C) Copyright 1991 Dave Fritsche (wb8zxu), All Rights Reserved.
- *
- * Redistribution and use in source and binary forms are permitted for
- * non-commercial use, provided that the above copyright notice and this
- * paragraph are duplicated in all such forms. THIS SOFTWARE IS PROVIDED
- * ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
- * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE.
- */
- #include <stdio.h>
- #include "screen.h"
-
- mk_fing()
- {
- FILE *finger;
- unsigned char buf[128];
-
- sprintf(buf, "%s\\finger\\%s", path, callsign);
- if (debug)
- {
- printf("***> finger file (%s):\n", buf);
- finger = stdout;
- }
- else
- if ( (finger = fopen(buf, "w")) == NULL )
- {
- printf("\nCan't open \"%s\" for write, aborting!\n\n", buf);
- exit(-1);
- }
-
- fprintf(finger, "*********************************************************\n");
- fprintf(finger, " Greetings, welcome to the PC of %s\n", name);
- fprintf(finger, " running the KA9Q TCP/IP package: NOS\n");
- fprintf(finger, "*********************************************************\n");
- fprintf(finger, " User: %s\n", callsign);
- fprintf(finger, " IP Address: [%ld.%ld.%ld.%ld]\n",
- ((ip >> 24) & 0xff), ((ip >> 16) & 0xff), ((ip >> 8) & 0xff),
- (ip & 0xff) );
- fprintf(finger, " Real Name: %s\n", name);
- fprintf(finger, " Phone: %s\n", phone);
- fprintf(finger, " Address: %s\n", street);
- fprintf(finger, " %s, %s %s\n", city, state, zip);
- fprintf(finger, "*********************************************************\n");
- fprintf(finger, " Please address any SMTP mail to: %s@%s\n", callsign, callsign);
- fprintf(finger, "*********************************************************\n");
-
- if (!debug)
- fclose(finger);
- }
-